package com.ctrip.study.jpa.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.ctrip.study.jpa.dao.UserDao;
import com.ctrip.study.jpa.entity.User;

@Service
public class UserServiceImpl implements UserService{
	
	@Autowired
	private UserDao userDao;
	
	public void saveUser(User user){
		userDao.save(user);
	}
	
	public User findUserById(int id){
		System.out.println("findUserById>>>>>>>>>>>>>>");
		return userDao.findOne(id);
	}
	

}
